import * as crypto from 'crypto';
export class LCrypto {
    static md5 = function (content: any): string {
        var md5 = crypto.createHash('md5');
        md5.update(content);
        return md5.digest('hex');
    }

    static toBase64 = function (content: any): string {
        return new Buffer(content).toString('base64');
    }

    static fromBase64 = function (content: any): string {
        return new Buffer(content, 'base64').toString();
    }
}